
def internal_1():
  """Internal call DN1 to DN2, abnormal release DN1"""
  SipPhone1.MakeCall(DN2)
  SipPhone1.ReleaseCall()

def internal_2():
  """Internal call DN1 to DN2,  release DN1"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone1.ReleaseCall()

def internal_3():
  """Internal call DN1 to DN2,  release DN2"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.ReleaseCall()


def internal_4():
  """Internal call DN1 to  DN2, two step transfer to DN3, release DN3"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone3.AnswerCall()
  SipPhone2.CompleteTransfer()
  SipPhone3.ReleaseCall()


def internal_5():
  """Internal call DN1 to  DN2, DN2 init transfer to DN3, release DN1, release DN2"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone1.ReleaseCall()
  SipPhone2.ReleaseCall()
  
def internal_6():
  """Internal call DN1 to  DN2, DN2 init transfer to DN3, release DN1, DN3 answer, release DN3"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone1.ReleaseCall()
  SipPhone3.AnswerCall()
  SipPhone3.ReleaseCall()  
  
def internal_7():
  """Internal call DN1 to  DN2, DN1 init transfer to DN3, release DN2, DN3 answer, release DN3"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone1.InitiateTransfer(DN3)
  SipPhone2.ReleaseCall()
  SipPhone3.AnswerCall()
  SipPhone3.ReleaseCall()   

def internal_8():
  """Internal call DN1 to  DN2, DN1 init transfer to DN3, DN2 answer, DN3 answer, release DN3, release DN2"""
  SipPhone1.MakeCall(DN2)
  SipPhone1.InitiateTransfer(DN3)
  SipPhone2.AnswerCall()
  SipPhone3.AnswerCall()
  SipPhone3.ReleaseCall()  
  SipPhone2.ReleaseCall()    

def internal_9():
  """Internal call DN1 to  DN2, DN1 init transfer to DN3,  DN3 answer, DN2 answer, release DN3, release DN2"""
  SipPhone1.MakeCall(DN2)
  SipPhone1.InitiateTransfer(DN3)
  SipPhone3.AnswerCall()
  SipPhone2.AnswerCall()
  SipPhone3.ReleaseCall()  
  SipPhone2.ReleaseCall() 
  

def internal_10():
  """Internal call DN1 to  DN2, two step transfer to DN3, abnormal release DN1"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone2.ReleaseCall()
  SipPhone1.ReleaseCall()

def internal_11():
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone1.ReleaseCall()
  SipPhone2.ReleaseCall()


def  internal_12():
  """Internal call to  DN2, two step transfer to DN3, release DN3"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone3.AnswerCall()
  SipPhone2.CompleteTransfer()
  SipPhone3.ReleaseCall()

def internal_13():
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone3.AnswerCall()
  SipPhone1.ReleaseCall()
  SipPhone3.ReleaseCall()


def internal_14():
  """Internal call DN1 to DN2, two step transfer to DN3, completed before consulted party answer"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone2.CompleteTransfer()
  SipPhone3.AnswerCall()
  SipPhone1.ReleaseCall()

def internal_15():
  """Internal call, two step transfer to DN3, completed before consulted party answer, abnor"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone2.CompleteTransfer()
  SipPhone1.ReleaseCall()


def internal_16():
  """something"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateTransfer(DN3)
  SipPhone3.AnswerCall()
  SipPhone1.ReleaseCall()
  SipPhone2.InitiateTransfer(DN1)
  SipPhone2.CompleteTransfer()
  SipPhone1.AnswerCall()
  SipPhone3.ReleaseCall()  

def internal_17():
  """Internal call DN1 to DN2, internal conference to DN3, release DN1, DN2"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateConference(DN3)
  SipPhone3.AnswerCall()
  SipPhone2.CompleteConference()
  SipPhone1.ReleaseCall()
  SipPhone2.ReleaseCall()

def internal_18():
  """Internal call DN1 to DN2, DN2 cinit conference to DN3, abnorl release DN2, release DN1"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateConference(DN3)
  SipPhone2.ReleaseCall()
  SipPhone1.ReleaseCall()


def internal_19():
  """Internal call DN1 to DN2, DN2 conference to DN3, completed before consulted party answer"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateConference(DN3)
  SipPhone2.CompleteConference()
  SipPhone3.AnswerCall()
  SipPhone1.ReleaseCall()
  SipPhone2.ReleaseCall()

def internal_20():
  """Internal call DN1 to DN2, DN2 conf to DN3, compl before cons. party answer, abnor. release DN2"""
  SipPhone1.MakeCall(DN2)
  SipPhone2.AnswerCall()
  SipPhone2.InitiateConference(DN3)
  SipPhone2.CompleteConference()
  SipPhone2.ReleaseCall()
  SipPhone3.AnswerCall()
  SipPhone1.ReleaseCall()